package com.darren.framework.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

import com.alibaba.fastjson.annotation.JSONField;


@MappedSuperclass
public class BaseEntity {
	
	@JSONField(name="createBy")
    @Column(name = "create_by",columnDefinition = "bigint default null comment '创建这条记录的用户ID'")	
    private String createBy;

    @JSONField(name="createTime",format="yyyy-MM-dd HH:mm:ss")
    @Column(name = "create_time",nullable = true, columnDefinition = "datetime DEFAULT CURRENT_TIMESTAMP comment '创建这条记录的时间'")
    private Date createTime;

    
    @JSONField(name="updateBy")
    @Column(name = "update_by",columnDefinition = "bigint default null comment '最近一次修改这条记录的用户ID'")
    private String updateBy;


    @JSONField(name="updateTime",format="yyyy-MM-dd HH:mm:ss")
    @Column(name = "update_time",nullable = true, columnDefinition =  "datetime DEFAULT CURRENT_TIMESTAMP comment '最近一次修改这条记录的时间'")
    private Date updateTime;
    
    /**
     * 数据状态，是否删除：true是已删除；false 是未删除
     */
    @Column(name = "is_delete",columnDefinition = "bit default 0 comment '数据状态，是否删除：1 是已删除；0 是未删除'")
	private boolean delete = false;

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public boolean isDelete() {
		return delete;
	}

	public void setDelete(boolean delete) {
		this.delete = delete;
	}
	
}
